
/**
 * Created by xiongshilin on 2017/4/13.
 */
(function(){
    ADF.model.BootstrapColumnModel = function() {
        ADF.model.BootstrapColumnModel.superclass.constructor.call(this);
    };
    COM.util.defineClass(ADF.model.BootstrapColumnModel, ADF.model.CompositeModel, {
        initModel: function() {
            ADF.model.BootstrapColumnModel.superclass.initModel.call(this);
            var layoutData = new AGEF.PropertyDescriptor("layoutData", "col-md-2", "col-md-2", false);
            this.addPropertyDescriptor(layoutData);
        },
        getLayoutData: function() {
            return this.getPropertyValue("layoutData");
        },
        setLayoutData: function(layoutData) {
            this.setPropertyValue("layoutData", layoutData);
        },
        fillSerializedJson : function(jsonObject){
            ADF.model.BootstrapColumnModel.superclass.fillSerializedJson.call(this, jsonObject);
            jsonObject["layoutData"] = this.getPropertyDescriptor("layoutData").serialize();
        },
        _deserialize: function(jsonObject){
            ADF.model.BootstrapColumnModel.superclass._deserialize.call(this, jsonObject);
            var newProp = new AGEF.PropertyDescriptor();
            newProp.deserialize(jsonObject["layoutData"]);
            this.propertyDescriptors.put(newProp.getName(), newProp);
        },

        _getModelType: function(){
            return "ADF.model.BootstrapColumnModel";
        },
        _getName : function(){
            return 'column';  
        },

        _getShowText : function(){
            return "BootstrapCol";
        }
    });
})();